<%@ page language="java"  pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@ include file="/_taglib.jsp" %>
<c:choose> 
<c:when test="${dlgFlag==1}">
				<table class="table" id="lookup-data-table" 
					data-toggle="table"
					data-target="#lookupbackDialog"
					data-page-size="5"
					data-url="sys/org/list" 
                    data-toolbar="#filter-bar"
                    data-show-refresh = "false"
                    data-show-toggle = "false"
                    data-show-columns = "false"
                    data-show-export = "false"
                    data-search-value="${search }"
					data-total-rows="${page.totalRow }"
					data-total-page="${page.totalPage }"
					data-page-number="${page.pageNumber }"
					data-page-size="${page.pageSize }"
					<c:if test="${!empty sort}">data-sort-name="${sort}"</c:if>
					<c:if test="${!empty sort}">data-sort-order="${order}"</c:if>
					>
				    <thead>
					<tr>
						<c:forEach items = "${colFieldMapList}" var = "fieldItem" varStatus="status">
						<th data-field="${fieldItem.field}" data-align="center" data-sortable="true">${fieldItem.fieldName}
						</th>
						</c:forEach>
						<th data-align="center">操作</th>
					</tr>				    
				    </thead>
	                <c:forEach items = "${page.list}" var = "item" varStatus="status">
					<tr>
						<c:forEach items = "${colFieldList}" var = "item1">
						<td>${item.get(item1) }</td>
						</c:forEach>
						<td>
							<div class="btn-group">
								<button class="btn btn-default bringback" type="button" name="btnBringback" title="选中" 
									backKey="${item.id}" backValue="${item.loginName}">
								<i class="fa fa-check"></i></button>
							</div>						
						</td>
					</tr>
					</c:forEach>				    
				</table>
</c:when>
<c:otherwise>

<%@ include file="/_navbar.jsp" %>

<section class="content">
    <div class="row">

        <div class="col-md-12">
				<div id="custom-toolbar">
                     <div class="box-body">
                         <div class="row">
                             <div class="col-xs-3">
                                 <input type="text" id="jfk_org__id" op="eq" class="query-field form-control" placeholder="编号" value="${jfk_org__id}">
                             </div>
                             <div class="col-xs-3">
                                 <input type="text" id="jfk_org__groupName" op="like" class="query-field form-control" placeholder="机构名称" value="${jfk_org__groupName}">
                             </div>
                             <div class="col-xs-3">
                             	<j:select dictType="dataStatus" id="jfk_org__status" name="jfk_user__status" isNull="true" label="数据状态"/>
                             </div>
                         </div>
                     </div><!-- /.box-body -->
				</div>

				
				<table class="table" id="data-table" data-toggle="table"
					data-url="sys/org/list" 
					data-del-url="sys/org/del" 
					data-del-all-url="sys/org/delAll" 
					data-add-url="sys/org/edit" 
                    data-toolbar="#custom-toolbar"
                    data-dialog="#dialog"
                    data-search-value="${search }"
					data-total-rows="${page.totalRow }"
					data-total-page="${page.totalPage }"
					data-page-number="${page.pageNumber }"
					data-page-size="${page.pageSize }"
					<c:if test="${!empty sort}">data-sort-name="${sort}"</c:if>
					<c:if test="${!empty sort}">data-sort-order="${order}"</c:if>
					>
				    <thead>
					<tr>
				        <th data-field="state" data-checkbox="true">选择</th>
						<c:forEach items = "${colFieldMapList}" var = "fieldItem" varStatus="status">
						<th data-field="${fieldItem.field}" data-align="center" data-sortable="true">${fieldItem.fieldName}
						</th>
						</c:forEach>
						<th data-align="center">操作</th>
					</tr>				    
				    </thead>
	                <c:forEach items = "${page.list}" var = "item" varStatus="status">
					<tr>
						<td></td>
						<c:forEach items = "${colFieldList}" var = "item1">
						<c:choose>
							<c:when test="${item1=='status'}">
								<td><j:kv key="${item.get(item1) }" column="dict_value" table="jfk_dict"/></td>
							</c:when>
							<c:otherwise>
								<td>${item.get(item1) }</td>
							</c:otherwise>
						</c:choose>
						
						</c:forEach>
						<td>
							<div class="btn-group">
								<button onclick="loadAjaxContent('sys/org/edit/${item.id}')" class="btn btn-default" type="button" name="edit" title="编辑"><i class="glyphicon glyphicon-pencil"></i></button>
								<button class="btn" type="button" name="del" title="删除" onclick="del('${item.get('id')}');"><i class="glyphicon glyphicon-remove-sign"></i></button>
							</div>						
						</td>
					</tr>
					</c:forEach>				    
				</table>
            </div>
        </div>
    </div>

<div id="dialog"></div>
<div id="filter-bar"></div>


</section>
</c:otherwise>
</c:choose>

<%@ include file="/_list_js.jsp" %>

